﻿
namespace OpenShape
{
    class charF
    {
        public string Left(string pStr, int pInt)
        {
            string tempStr;
            tempStr = pStr.Substring(0, pInt);
            return tempStr;
        }

        public string Right(string pStr, int pInt)
        {
            string tempStr;
            tempStr = pStr.Substring(pStr.Length - pInt, pInt);
            return tempStr;
        }
        public string Mid(string pStr, int pSInt, int pCount)
        {
            string tempStr;
            tempStr = pStr.Substring(pStr.Length - pSInt - 1, pCount);
            return tempStr;
        }

        public string Erase(string pStr, int pSint, int pCount)
        {
            string tempStr;
            if (pSint == 0)
            {
                tempStr = this.Right(pStr, pStr.Length - pCount);
            }
            else
            {
                tempStr = this.Left(pStr, pSint) + this.Right(pStr, pStr.Length - pCount - (this.Left(pStr, pSint)).Length );
            }
            return tempStr;
        }

    }
}